<%@ page language="java" pageEncoding="utf-8"%>
<%@ page language="java" import="java.util.*"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>国际研究生教育法律法规信息资料数据库</title>
<link href="css/userfile.css" type="text/css" rel="stylesheet" />
<link href="css/base.css" type="text/css" rel="stylesheet" />
<link href="css/page.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/secloud.js"></script>

</head>



<body>

  <s:include value="../user_page_top.jsp"/>
  
  <div style="height:20px;"></div>
<div class = "usercont">
  	<s:include value="../user_page_left.jsp"/>
  
  
    <div class="width-800 right">
		<div class="righttcont">
        	<div class="search">
        	<s:form action="searchUser" namespace="/admin" method="get">
				<s:textfield name="searchInfo" />
				<s:hidden name="pageSize" value="15"></s:hidden>
	    		<s:hidden name="pageNow" value="1"></s:hidden>
				<button type="submit" >搜索用户</button>
			</s:form>
        	 
            </div>
        </div>
        
        
			
        <div style="height:20px;"></div>
        <div class="righttcont">
        <h3>修改权限</h3>
        
        	<s:form action="editUser" namespace="/admin" method="post">
				<table>
				<tr>
        			<th><label>用户名</label></th>
        			<td><s:textfield disabled="ture" name="userInfo.username" />
        			</td>
      			</tr>
					
				  <tr>
					<th><label>管理员</label></th>
					<td  onClick="show_hide_auth()">
					  <s:checkbox name="userInfo.isAdmin"/>
					  <label for="editUser_userInfo_isAdmin">管理员</label>
					</td>
				  </tr>
				  <tr >
					<th>权限</th>
					<td>
					<s:if test="userInfo.isAdmin == true">
						<s:checkboxlist	name="auths" value="auths"
							list="#{'3':'超级管理员','1':'用户管理员','2':'文件管理员'}"/>
					</s:if>
					<s:else>
						<s:checkboxlist	name="auths" disabled="true"
							list="#{'3':'超级管理员','1':'用户管理员','2':'文件管理员'}"/>
					</s:else>
					</td>
				  </tr>
				  <tr>
					<th></th>
					<td>
					  <button type="submit" >提交</button>
					</td>
				  </tr>
				  
				</table>
  
			</s:form>
        </div>
        <div style="height:20px;"></div>
        <div class="righttcont">
        <div class="title">
        	<h3>近期执行操作</h3>
            </div>
			<table class="list_style">
            <thead>
            <tr class="tcat">
            	<td style="width: 150px;">操作时间</td>
                <td style="width: auto;">操作内容</td>
                
            </tr>
            </thead>
            <tbody class="tbody">
            	<s:iterator value="editLogList" status="stat">
            	<tr 
  		<s:if test="#stat.odd"> class="alt1"</s:if>
  				>
				<td><s:date format="yyyy-MM-dd" name="date"/>
				</td>
				<td>
				<s:if test="operate == 0">上传文件</s:if>
				<s:elseif test = "operate == 1">删除文件</s:elseif>
				<s:elseif test = "operate == 2">修改文件</s:elseif>
				<s:else>其他</s:else>
				<s:property value="item.fileName"/></td>
			 	</tr>
            	
            	</s:iterator>
			  
			 </tbody>
			</table>
			
			<div class="messagepage">
 
	  <p style="margin-left:20px">共<s:property value="pageCount"/>条，当前第<s:property value="pageNow"/>页，每页<s:property value="pageSize"/>条</p>
	  
	  <ul>
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >首页</a>
       </li>
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageNow-1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >上一页</a>
        </li>
      
	  <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageNow+1"></s:param>	
	    	<s:param name="searchInfo" value="searchInfo"></s:param>
          	</s:url>"
        >下一页</a>
        </li>
      <li><a href="<s:url includeParams="get" encode="true">
	    	<s:param name="pageSize" value="pageSize"></s:param>
	    	<s:param name="pageNow" value="pageCount/pageSize+1"></s:param>	 
	    	<s:param name="searchInfo" value="searchInfo"></s:param>   	
          	</s:url>"
        >末页</a>
        </li>
        </ul>
       
        </div>
        </div>
     </div>
</div>
    
	<s:include value="../foot.jsp"/>
    


</body>
</html>
